﻿<script>
    function bc() {
        location.href = "Create";
    }
</script>
<button type="button" onclick="bc()" class="btn btn-secondary">添加</button>
<form action="getclasses" method="post">
    <input type="text" name="likestr" value="" placeholder="请输入关键字" />
    <input type="submit" value="搜索" />
</form>
<table class="table table-dark">
    <thead>
        <tr>
            <th scope="col">#</th>
            <th scope="col">班级名称</th>
            <th scope="col">专业</th>
            <th scope="col">操作</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var c in Model)
        {
            <tr>
                <th scope="row">@c.id</th>
                <td>@c.class_name</td>
                <td>@c.major_name</td>
                <td><a href="Edit?id=@c.id">修改</a>|<a href="Delete?id=@c.id">删除</a></td>
            </tr>
        }

    </tbody>
</table>